{{include file="user/u_header.html"}}
<script type="text/javascript" src="res/public/js/jquery/jquery.form.js"></script>
<script type="text/javascript" src="res/public/js/geo_selection.js"></script>
<script type="text/javascript" src="res/user/js/address.js"></script>
<script type="text/javascript"> var initGeoCode = '{{$user.GEO_CODE}}';</script>
<div class="w998 u_main">
	{{include file="user/u_leftMenu.html"}}    
    <div class="Fr right">
    	<div class="u_where">您当前位置：会员中心 &gt;&gt; 个人中心 &gt;&gt; 收货地址管理</div>
    	<!--右侧开始-->
    	<div class="u_box1">
			<h2><span></span><font><i id="act_title" class="f_Red">新增</i>收货地址</font> <a href="#"></a></h2>
<form id="form1" name="form1" method="post" action="user.php?c=address&a=ajaxsave">
<table width="100%" border="0" cellspacing="3" cellpadding="3">
 <tr class="">
    <td width="120" align="right"><strong class="f_Red1">*</strong> 收货人姓名：</td>
    <td><input name="realname" id="realname" type="text">
        <input name="address_id" id="address_id" type="hidden" value=""></td>
  </tr>
  <tr class="">
    <td align="right"><strong class="f_Red1">*</strong> 所在地区：</td>
    <td id="geo_selection">
        <select name="geo_level1" id="geo_level1" style="width:70px"></select>
        <select name="geo_level2" id="geo_level2"></select>
        <select name="geo_level3" id="geo_level3"></select>
        <select name="geo_level4" id="geo_level4"></select>
        <select name="geo_level5" id="geo_level5"></select>
        <input type="hidden" name="geo_code" id="geo_code" value="0" />
    </td>
  </tr>
  <tr class="">
    <td align="right"><strong class="f_Red1">*</strong> 街道地址：</td>
    <td><textarea name="address" id="address" style="width:350px;height:40px"></textarea>
      <label id="label_address" for="address">不需要重复填写省/市/区，至少输入5个字符 </label></td>
  </tr>
  <tr class="">
    <td align="right"> 邮政编码：</td>
    <td><input name="zip_code" maxlength="6" id="zip_code" type="text"></td>
  </tr>
  <tr class="">
    <td align="right">电话号码：</td>
    <td><input name="tel" id="tel" type="text" style="width:160px;">
      <span>区号-电话号码</span></td>
  </tr>
  <tr class="">
    <td align="right"><strong class="f_Red1">*</strong> 手机号码：</td>
    <td><input name="mobile" id="mobile" type="text" value="{{$user.PHONE}}" style="width:370px;"></td>
  </tr>
  <tr class="">
    <td align="right">设为默认：</td>
    <td><input type="checkbox" name="is_default" id="is_default" value="1"></td>
  </tr>
  <tr class="">
    <td colspan="2" align="center">
        <input type="button" name="btn_submit" id="btn_submit" class="btnbj btn_red" value="确定添加">
        <input type="reset" name="btn_reset" id="btn_reset" value="取消编辑" style="display:none" class="btnbj btn_gray" onclick="restform()"></td>
  </tr>
</table>
</form>
        </div>
        <div class="u_box1">
			<h2><span></span><font>收货地址列表<em>(最多保存20个有效地址)</em></font> <a href="#"></a></h2>
<table width="100%" border="0" cellspacing="1" cellpadding="0" id="addresslist" class="tablecss">
  <tr>
    <th style="border-left:1px solid #e1e1e1">收货人 </th>
    <th>街道地址</th>
    <th>邮编</th>
    <th>电话/手机</th>
    <th style="border-right:1px solid #e1e1e1">操作</th>
  </tr>
  {{foreach from=$addressList item=model}}
  <tr id="row{{$model.ID}}" style="text-align:center;">
    <td>{{$model.REALNAME}}{{if $model.IS_DEFAULT}}<font color="blue">[默认]</font>{{/if}}</td>
    <td><span class="Color9"><span name="geo" id="{{$model.GEO_CODE}}">s</span>{{$model.ADDRESS|replace:"-":"<br/>"}}</span></td>
    <td><span class="Color2">{{$model.ZIP_CODE}}</span></td>
    <td>{{if $model.TEL!=""}}{{$model.TEL}}<br />{{/if}} {{$model.MOBILE}}
    </td>
    <td><button class="btnbj btn_green" onclick="javascript:edit({{$model.ID}})">编辑</button>
    &nbsp;&nbsp;<button class="btnbj btn_red" onclick="javascript:del({{$model.ID}})">删除</button></td>
  </tr>
  {{foreachelse}}
    <tr><td colspan="5" align="center">没有找到相关的地址信息</td></tr>
  {{/foreach}}
</table>
        </div>
    	<!--右侧结束-->
    </div>
</div>
<div class="spacer"></div>
{{include file="user/u_footer.html"}}
